package com.jia.leetCode;

/**
 * @program: Leetcode
 * @description:  https://leetcode-cn.com/problems/count-odd-numbers-in-an-interval-range/
 * @author: STU756
 * @create: 2020-09-03 01:47
 */
public class Pro1523 {
    public int countOdds(int low, int high) {
        int count = high - low + 1;
        return count % 2 == 0? count / 2 : count / 2 + ((low%2 == 1)? 1 : 0);
    }
}
